<style>
#listResult {margin:auto; text-align:center;border: #000 solid 2px; border-collapse:collapse;font-size:12pt; width:95%}

#listResult td,#listResult th {border: #000 solid 1px;}
</style>
<?php $gradeName = unserialize($this->School['length_name']);?>
<?php foreach ($this->data as $classSn=> $rows):?>

<table id="listResult" class="listTable">
<thead>
<tr>
<td colspan="8" style="font-size:15pt;font-weight: bold">
<?php echo  $this->School['name_short']?>
<?php $arr = explode('-',$rows[0]['year_semester'])?>
<?php echo sprintf($this->translate('%d year %d semester %s'),$arr[0], $arr[1], $gradeName[$arr[2]])?> 編班名冊
<DIV ALIGN="right" >導師：<U>　　　　　　　　</U>.</DIV>
</td>
</tr>
<tr>
<th><?php echo  $this->translate('student id')?></th>
<th><?php echo  $this->translate('class order')?></th>
<th><?php echo  $this->translate('student number')?></th>
<th><?php echo  $this->translate('student sex')?></th>
<th><?php echo  $this->translate('student name')?></th>
<th><?php echo  $this->translate('old class')?></th>
<th><?php echo  $this->translate('old number')?></th>
<th><?php echo  $this->translate('memo')?></th>
</tr>
</thead>
<tbody>
<?php $page=0;?>
<?php foreach($rows as $val):?>
<tr>
<td><?php echo  $val['student_id']?></td>
<td><?php echo  $val['new_class']?></td>
<td><?php echo  $val['new_number']?></td>
<td><?php echo  ($val['student_sex'] == 'M')? $this->translate('boy'): $this->translate('girl')?></td>
<td><?php echo  $val['student_name']?></td>
<td><?php echo  $val['class_name']?></td>
<td><?php echo  $val['number']?></td>
<td></td>
</tr>
<?php endforeach?>
</tbody>
</table>

<TABLE width=95% align=center >
<TR align=center>
<td>&nbsp;</td>
<td>第<B><?php echo  ++$page?></B>頁</td>
<td>製表日期：<?php echo  date("Y-m-d")?></TD>
</TR>
<TR>
<TD width=33%>承辦人：</TD>

<TD width=33%>教務主任：</TD>
<TD width=34%>校長：</TD>
</TR>
</TABLE>
<P STYLE='page-break-before: always;'>
<?php endforeach;?>